﻿namespace Keede.RabbitMQ.EasyClient
{
    public class Consumer : BaseClient, IConsumer
    {
        public Consumer(Authorization auth, string exchange, string msgAssemblyPath, bool isLogDetail = false, ushort prefetchCount = 20)
            : base(auth, exchange, msgAssemblyPath, isLogDetail, prefetchCount)
        {
        }

        public Consumer(Authorization auth, string exchange, bool isLogDetail = false)
            : base(auth, exchange, isLogDetail)
        {
        }

        /// <summary>
        /// subscribe message
        /// </summary>
        /// <param name="queueListener">listener</param>
        public void Subscribe(IQueueListener queueListener)
        {
            this._mqClient.Subscribe(queueListener);
        }
    }
}
